const nat ={
  state:{
    natdata:[],    
  },
  mutations:{
    getnatdata(state,data){
      state.natdata = data
      console.log(data);
    }
  },
  actions:{
    async getnatdata(context,payload){
      let response = await context.dispatch('axios',{
        method:'get',
        url:'/api/sam/web/nat_task'
      })
      context.commit('getnatdata',response.data)
    },
    async addnatdata(context,payload){
      let response = await context.dispatch('axios',{
        method:'post',
        url:'/api/sam/web/nat_task',
        data:{
          payload
        }
      })
    },
    async updatanatdata(context,payload){
      let response = await context.dispatch('axios',{
        method:'put',
        url:'/api/sam/web/nat_task',
        data:{
          payload
        }
      })
    },
    async deletenatdata(context,payload){
      let response = await context.dispatch('axios',{
        method:'delete',
        url:'/api/sam/web/nat_task',
        data:{id: payload}
      })
    }
  },
  getters:{},
}
export default nat